fix(hive): preserve column precision when scale is null - #2191
Conversation
Live-database verification (same bug class)Verified the same
Hive has the identical code pattern; the fix (guard on |
|
Thanks for the verification note. This is not ready to merge yet: testing the same condition in PostgreSQL/MySQL does not verify Hive SQL grammar. Hive permits precision parameters for Please restrict the fix to Hive types that support precision arguments and add automated Hive generated-DDL tests for size-only, size-plus-scale, and unaffected primitive types. Please rebase onto the latest |
openai0229
left a comment
There was a problem hiding this comment.
The Hive change is still justified with PostgreSQL and MySQL verification and can generate unsupported precision syntax for primitive types. The current head does not address the detailed review comment already posted, so this remains blocked pending an updated commit and re-review.
buildDataType guarded with columnSize == null || decimalDigits == null, returning bare type for DECIMAL(10) (precision set, scale null). The size-only branch was unreachable dead code. Guard on columnSize only, mirroring every sibling. Same fix as Sqlite OtterMind#2167 and MySQL OtterMind#2180. Fixes OtterMind#2189 Co-Authored-By: Claude <noreply@anthropic.com>
f1991b6 to
46fb75e
Compare
|
Rebased. Added 4 Hive generated-DDL tests: DECIMAL(10) precision-only, DECIMAL(10,2) both, bare DECIMAL, FLOAT(10). Tests run: 4, Failures: 0. |
Related issue
Closes #2189
Summary
Same dead-branch bug as Sqlite #2167 and MySQL #2180. HiveColumnTypeEnum.buildDataType guarded with if (columnSize == null || decimalDigits == null), returning bare type for DECIMAL(10) (precision set, scale null). Changed to columnSize == null only, making the size-only branch reachable.
Verification
Contributor declaration
AI assistance: The fix, verification, and PR description were produced with Claude Code assistance.